from django.urls import path, re_path
from myapp2 import views
from myapp2.views_class import *

urlpatterns = [
    path('myapp2/index/', views.index),
    path('myapp2/show/<int:id>/', views.show),
    path('myapp2/article/<uuid:id>/', views.show_uuid, name='show_uuid'),
    path('myapp2/article/<slug:q>/', views.show_slug, name='show_slug'),
    re_path('myapp2/list/(?P<year>\d{4})/', views.article_list),
    re_path('myapp2/page/(?P<page>\d+)&key=(?P<key>\w+)', views.article_page, name='article_page'),
    path('myapp2/url_reverse/', views.url_reverse, name='myapp2_url_reverse'),
    path('myapp2/test_get/', views.test_get),
    path('myapp2/test_post/', views.test_post),
    path('myapp2/test_response/', views.test_response),
    path('myapp2/test_render/', views.test_render),
    path('myapp2/test_redirect_model/<int:id>/', views.test_redirect_model, name='myapp2_test_redirect_model'),
    path('myapp2/userinfo/<int:id>/', views.userinfo, name='myapp2_userinfo'),
    path('myapp2/test_redirect_views/<int:id>/', views.test_redirect_views, name='myapp2_test_redirect_views'),
    path('myapp2/test_redirect/', views.test_redirect, name='myapp2_test_redirect'),
    path('myapp2/test_templateview/', TestTemplateView.as_view()),
    path('myapp2/test_listview/', TestListView.as_view()),
    path('myapp2/test_detailview/<slug:userid>/', TestDetailView.as_view()),
]
